package org.jsola.hr.web;

import java.util.List;

import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.AttendPlanAddDTO;
import org.jsola.hr.dto.AttendPlanUpdateDTO;
import org.jsola.hr.query.AttendPlanQuery;
import org.jsola.hr.vo.AttendPlanListVO;
import org.jsola.hr.vo.AttendPlanVO;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 * @author zhr
 */
@Api(tags = "hr-考勤方案")
public interface IAttendPlanControllerAPI {

    /**
     * 新增考勤方案
     * @param attendPlanSaveDTO 考勤方案新增实体
     * @return 考勤方案展示对象
     */
    @ApiOperation(value = "新增考勤方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendPlanAddDTO", dataType = "AttendPlanAddDTO", value = "新增考勤方案", paramType = "body")
    })
    Result<AttendPlanVO> save(AttendPlanAddDTO attendPlanAddDTO);


    /**
     * 修改考勤方案
     * @param attendPlanUpdateDTO 考勤方案
     * @return 更新数量
     */
    @ApiOperation(value = "修改考勤方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendPlanUpdateDTO", dataType = "AttendPlanUpdateDTO", value = "修改考勤方案", paramType = "body")
    })
    Result<Integer> update(AttendPlanUpdateDTO attendPlanUpdateDTO);




    /**
     * 删除单个考勤方案，彻底删除
     * @param attendPlanId 考勤方案id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个考勤方案，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendPlanId", dataType = "String", value = "考勤方案id", paramType = "path")
    })
    Result<Integer> delete(String attendPlanId);


    /**
     * 批量删除考勤方案，彻底删除
     * @param attendPlanIds 考勤方案id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除考勤方案，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendPlanIds", dataType = "String[]", value = "考勤方案id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] attendPlanIds);


    /**
     * 根据考勤方案id查询考勤方案详情
     * @param attendPlanId 考勤方案id
     * @return 考勤方案详情
     */
    @ApiOperation(value="根据考勤方案id查询考勤方案详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendPlanId", dataType = "String", value = "考勤方案id", paramType = "path")
    })
    Result<AttendPlanVO> findById(String attendPlanId);


    /**
     * 查询考勤方案
     * @param attendPlanQuery 考勤方案查询参数
     * @return page
     */
    @ApiOperation(value="查询考勤方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendPlanQuery", dataType = "AttendPlanQuery", value = "考勤方案查询参数", paramType = "query")
    })
    Result<List<AttendPlanListVO>> listAll(AttendPlanQuery attendPlanQuery);


     /**
     * 分页查询考勤方案
     * @param attendPlanQuery 考勤方案查询参数
     * @return page
     */
    @ApiOperation(value="分页查询考勤方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendPlanQuery", dataType = "AttendPlanQuery", value = "考勤方案查询参数", paramType = "query")
    })
    Result<Page<AttendPlanListVO>> page(AttendPlanQuery attendPlanQuery);


}

